package com.erbao.dp.command;

/**
 * @author CaoBaoYin
 * @since 21/9/28 09:13
 */
public class InsertCommand extends Command {
    Content c;

    String strToInsert = "erbao";
    public InsertCommand(Content c) {
        this.c = c;
    }

    @Override
    public void doit() {
        c.msg = c.msg.concat(strToInsert);
    }

    @Override
    public void undo() {
        c.msg = c.msg.substring(0, c.msg.length()-strToInsert.length());
    }
}
